package com.lagou.order.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lagou.common.pojo.Goods;
import com.lagou.common.pojo.OrderInfo;
import com.lagou.order.vo.QueryCondition;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author cyt
 * @date 2020/11/25
 */
@FeignClient(name = "lagou-service-goods", fallback = GoodsFallBack.class)
@RequestMapping("/goods")
public interface GoodsFeign {

    @RequestMapping("/query/{id}")
    public Goods queryById(@PathVariable("id") Integer id);

    @RequestMapping("/delete/{id}")
    public void deleteById(@PathVariable Integer id);

    @RequestMapping("/update")
    public void update(@RequestBody Goods goods);

    @RequestMapping("/query/page/{index}")
    public Page<Goods> queryByPage(@PathVariable Integer index, @RequestBody QueryCondition condition);

}
